Managing replication configuration availability

ABSTRACT

A computer program product for managing replication configurations includes program instructions to receive a replication configuration for replicating data, wherein the replication configuration defines at least a target table in a target database based on a source table in a source database. The program instructions initialize a federated view, wherein the federated view is based on at least the source table in the source database as defined in the replication configuration. The program instructions utilize the federated view to satisfy requesting applications, where requesting applications obtain data from the federated view. The program instructions to, responsive to determining the replication of data is in spec, utilize the target table in the target database to satisfy requesting applications.

BACKGROUND OF THE INVENTION

A typical replication process involves replicating data from a sourcedatabase to a target database, where often there can be a transformationprocess. A replication configuration defines a set of data that shouldbe available in the target database based on a set of data available inthe source database. There can be situations that impact theavailability of the set of data in the target database. For example,when the replication configuration is altered, there often will be newdata that is available in the source database that is not available inthe target database. A new replication configuration is created todefine the new data in addition to the data previously defined in theoriginal replication configuration.

The data as previously defined by the original replication configurationis not available until the new replication configuration is fulfilled.The data from the original replication configuration not being availablecan also be referenced to as data outage. Currently, an administrativeuser that created the original replication configuration has todetermine when to introduce the new replication configuration, such thatthe data outage does not interfere with applications that can idle whilewaiting to access the data in the target database. The other issues withnew replication configurations are possible replication latencies in thedata being replicated into the target database, as well as possiblereplication errors that can occur.

SUMMARY

Embodiments in accordance with the present invention disclose a method,computer program product and computer system for managing replicationconfigurations.

A computer program product includes: program instructions to receive afirst replication configuration for replicating data, wherein the firstreplication configuration defines at least a target table in a targetdatabase based on a source table in a source database; programinstructions to determine a latency value, wherein the latency valuerepresents a latency of replicating data from the source database to thetarget database; program instructions to, responsive to determining thelatency value exceeds a threshold latency value and a portion of thetarget table in the target database is damaged, determine to utilize afirst federated view to satisfy requesting applications; programinstructions to initialize the first federated view, wherein the firstfederated view is based on at least the source table in the sourcedatabase as defined in the first replication configuration; programinstructions to utilize the first federated view to satisfy requestingapplications, wherein requesting applications obtain data from the firstfederated view; program instructions to, responsive to determining thesource table matches the target table, utilize the target table in thetarget database to satisfy requesting applications; program instructionsto, responsive to determining the source table does not match the targettable, initialize a second federated view, wherein the second federatedview is based on at least the target table in the target database in thefirst replication configuration; program instructions to utilize thesecond federated view to satisfy requesting applications, whererequesting applications obtain data from the second federated view;program instructions to receive a second replication configuration forreplicating data, wherein the second replication configuration definesat least a new target table based on the source table; programinstructions to, responsive to determining the target table matches thenew target table, utilize the new target table in the target database tosatisfy requesting applications; program instructions to, responsive todetermining the target table does not match the new target table,initialize a third federated view, wherein the third federated view isbased on at least the new target table in the target database in thesecond replication configuration; and program instructions to utilizethe third federated view to satisfy requesting applications, whererequesting applications obtain data from the third federated view.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a functional block diagram illustrating a distributed dataprocessing environment, in accordance with an embodiment of the presentinvention.

FIG. 2 is a flowchart depicting operational steps of a replicationmanagement program for managing replication configuration availability,in accordance with an embodiment of the present invention.

FIG. 3 illustrates an example scenario of a replication managementprogram creating a federated view of a replication configuration, inaccordance with an embodiment of the present invention.

FIG. 4 is a block diagram of components of a computer system, such asthe computer server of FIG. 1, in accordance with an embodiment of thepresent invention.

DETAILED DESCRIPTION

Embodiments in accordance with the present invention manage replicationconfigurations by receiving a replication configuration for replicatingdata, where the replication configuration defines a target table in atarget database based on a source table in a source database.Embodiments in accordance with the present invention initialize afederated view, where the federated view is based on the source table inthe source database as defined in the replication configuration. Thefederated view is utilized to satisfy requesting applications, whererequesting applications obtain data from the federated view. Responsiveto determining the replication of data is in spec, the target table inthe target database is utilized to satisfy requesting applications.

FIG. 1 is a functional block diagram illustrating a distributed dataprocessing environment, in accordance with one embodiment of the presentinvention. The distributed data processing environment includes servercomputer 102, source database 104, and target database 106interconnected over network 108.

Server computer 102 may be a desktop computer, a laptop computer, atablet computer, a specialized computer server, a smartphone, or anyother computer system known in the art. In certain embodiments, servercomputer 102 represents a computer system utilizing clustered computersand components that act as a single pool of seamless resources whenaccessed through network 108, as is common in data centers and withcloud computing applications. In general, server computer 102 isrepresentative of any programmable electronic device or combination ofprogrammable electronic devices capable of executing machine-readableprogram instructions and communicating with other computer devices via anetwork. In this embodiment, server computer 102 has the ability tocommunicate with other computer devices to query the computer devicesfor information.

Replication management program 110 residing in server computer 102 hasthe ability to manage replication configuration availability. In oneembodiment, replication management program 110 is capable of receivingreplication configuration 112 for data in source database 104 which isto be replicated to target database 106. Utilizing federated managementprogram 114, an application can query for data, which may have beenpreviously defined by replication configuration 112. Replicationmanagement program 110 can send state information of the replicationprocess to federated management program 114 specifying whether to usethe source tables or the target tables to satisfy the query from theapplication. Replication management program 110 can determine to utilizethe federated view for applications requesting the data if newreplication configurations are received or if replication managementprogram 110 determines latency in the replication process of the data totarget database 106.

Replication management program 110 communicates with federatedmanagement program 114 to provide a virtualization strategy forapplications requesting access to data. Federated management program 114can push requests for data from target database 106 to source database104, allowing the requesting application access to the data. Replicationmanagement program 110 can determine when to utilize federatedmanagement program 114 to push data requests from target database 106 tosource database 104 based on various situations during the replicationprocess.

Source database 104 and target database 106 can respectively storesource data 116 and target data 118. Replication management program 110utilizes replication configuration 112 to define the replication ofsource data 116 located in source database 104 to target database 106.Target data 118 represents the finished replicated data of source data116 as defined by replication configuration 112. Source database 104 andtarget database 106 can also be located on server computer 102 or anyother location in the distributed data processing environment connectedto network 108.

In general, network 108 can be any combination of connections andprotocols that will support communications between server computer 102,source database 104, and target database 106. Network 108 can include,for example, a local area network (LAN), a wide area network (WAN) suchas the internet, a cellular network, or any combination of thepreceding, and can further include wired, wireless, and/or fiber opticconnections. In one embodiment, replication management program 110 andfederated management program 114 may be a web service accessible vianetwork 108 to a user of a separate device. In another embodiment,replication management program 110 and federated management program 114may be operated directly by a user of server computer 102.

FIG. 2 is a flowchart depicting operational steps of a replicationmanagement program for managing replication configuration availability,in accordance with an embodiment of the present invention.

Replication management program 110 receives a replication configuration(step 202). In this embodiment, replication management program 110receives the replication configuration for source data 116 beingreplicated to target database 106. Source data 116 located in sourcedatabase 104 contains data listed in a source table with the headings“key”, “first name”, “last name”, and “state”. The replicationconfiguration defines a replication to transform source data 116 in thesource table to target data 118 in a target table with the headings“key”, “full name”, and “state”. The replication configurationconcatenates the “first name” and “last name” of source data 116 tocreate the “full name” of target data 118.

Replication management program 110 initializes a federated view based ontables in the source database defined in the replication configuration(step 204). In this embodiment, replication management program 110communicates with federated management program 114 to initialize afederated view based on tables in source data 116. Replicationmanagement program 110 can utilizes the federated view for a requestingapplication in certain example scenarios such as, during replicationlatency increases and changes to the replication configuration. Inanother embodiment, replication management program 110 communicates withfederated management program 114 to initialize a federated view based onreplicated tables that exist in target database 106 during thereplication process.

Replication management program 110 initialize the replication of datainto the physical tables of the target database (step 206). Replicationmanagement program 110 initializes a synchronization of the replicationconfiguration by creating views in target database 106 based on tablesin source data 116 located in source database 104, where any informationdefined by the replication configuration is replicated into the views.Any application which requests data that is part of the replicationconfiguration can utilize the views to obtain the data.

Since the requesting application already has access to the data,replication management program 110 can replicate the data into thephysical tables of target database 106, where the physical tables haveinternal names. Subsequent to the synchronization being completed,replication management program 110 can rename the internal names of thephysical tables to what is defined by the views of the replicationconfiguration. For any queries replication management program 110receives, the requesting application can utilizes the physical tableswith the replicated data.

Replication management program 110 determines if the replication is inspec (decision step 208). In this embodiment, the replication being inspec represents a replication with a latency value that is within aspecification previously defined by an administrative user (i.e.,customer). In the event the replication is not in spec (“no” branch,step 208), replication management program 110 determines if a latencythreshold (e.g., 10 seconds) was exceeded for the replication of sourcedata 116 to target data 118. In the event the replication is in spec(“yes” branch, step 208), replication management program 110 determinesto cease the utilization of the federated view of the data (step 214).

Replication management program 110 determines if a latency threshold isexceeded (decision step 210). In the event the latency threshold is notexceeded (“no” branch, step 210), replication management program 110reverts back to decision step 208. In the event the latency threshold isexceeded (“yes” branch, step 210), replication management program 110determines to utilize the federated view for applications until thereplication of data is in spec, where the latency threshold is no longerexceeded.

In this embodiment, latency is a measure of the replication delay ofdata between source database 104 and target database 106. For example,replication management program 110 determines a latency value for thereplication of data to be 5 seconds. However, a pre-determined latencythreshold is 10 seconds. The pre-determined latency threshold can beconfigured by an administrative user of replication management program110 depending on particular business cases. Replication managementprogram 110 determines that the latency for the replication of data hasnot exceeded the latency threshold. The latency threshold indicates whentarget data 118 in target database 106 is no longer accurate for usageby a requesting application.

Replication management program 110 determines to utilize the federatedview for applications (step 212). In this embodiment, the federated viewis based on the tables of source data 116. Replication managementprogram 110 utilizes the federated view while constantly monitoring thereplication latency of source data 116. An administrative user ofreplication management program 110 can specify when to obtain latencyvalues for the replication of source data 116 to determine whether ornot the latency threshold has been exceeded. During instances where thelatency threshold is not exceeded, replication management program 110utilizes the physical tables of target data 118. In another embodiment,the federated view is based on the physical tables of target data 118.Replication management program 110 continuously maintains the physicaltables of target data 118 according to any new replicationconfigurations that replication management program 110 can receive.

In another embodiment, replication management program 110 monitorstarget data 118 to determine if a portion of the tables has been damagedduring the replication process. Replication management program 110determines to use the initialized federated view while replicationmanagement program 110 repairs the damaged portion of the tables.Replication management program 110 provides availability of the dataduring the repair of the damaged portion through the federated view.

Replication management program 110 may determine to cease theutilization of the federated view of the data (step 214). Uponcompletion of the replication of source data 116 to target data 118, aspreviously defined by the replication configuration, replicationmanagement program 110 ceases the federated view. Replication managementprogram 110 can send a notification to federated management program 114specifying that replication is in spec and federated management program114 can remove the federated view.

FIG. 3 illustrates an example scenario of a replication managementprogram creating a federated view of a replication configuration, inaccordance with an embodiment of the present invention.

In this illustrated example, replication management program 110 receivesa replication configuration, where source data 302 is being replicatedto target data 304. As previously mentioned in an example during thediscussion of FIG. 2, source table 308 includes column headings “key”,“first name”, “last name”, and “state”. Target table 310, also referredto as a physical table, includes column headings “key”, “name”, and“state”, where the “name” is the concatenation of “first name” and “lastname” from source table 308.

In this illustrated example, replication management program 110 queriesfederated management program 114 to initialize federated view 306.Federated view 306 is based on source table 308, where federated table312 includes the same headings as source table 308. During thereplication process, replication management program 110 monitors currentlatency values of the replication of data between source data 302 andtarget data 304. In the event a current latency value exceeds athreshold latency value, replication management program 110 determinesto utilize federated view 306 to satisfy application requests. In theevent the current latency value does not exceed the threshold latencyvalue, replication management program 110 determines to utilize targetdata 304 to satisfy application requests. Replication management program110 can utilize federated view 306 when a change in the replicationconfiguration is received. As previously mentioned, federated view 306is based on source table 308 to ensure the synchronization of targetdata 304 with the new replication configuration as defined by sourcedata 302.

In another example not illustrated in FIG. 3, federated view 306 can bebased on target table 310. When replication management program 110receives a new replication configuration, replication management programhas to re-initialize the replication and synchronize target table 310 tomatch the definitions set in the new replication configuration. Duringthe re-initialization, replication management program 110 can choose toadd or remove any portions of the tables as defined by the newreplication configuration. Subsequent to the re-initialization,replication management program 110 can initialize federated view 306based on the physical tables, target table 310.

FIG. 4 depicts a block diagram of components of a computer, such asserver computer 102, replication management program 110 withindistributed data processing environment, in accordance with anillustrative embodiment of the present invention. It should beappreciated that FIG. 4 provides only an illustration of oneimplementation and does not imply any limitations with regard to theenvironments in which different embodiments may be implemented. Manymodifications to the depicted environment may be made.

Server computer 102 includes communications fabric 402, which providescommunications between computer processor(s) 404, memory 406, persistentstorage 408, communications unit 410, and input/output (I/O)interface(s) 412. Communications fabric 402 can be implemented with anyarchitecture designed for passing data and/or control informationbetween processors (such as microprocessors, communications and networkprocessors, etc.), system memory, peripheral devices, and any otherhardware components within a system. For example, communications fabric402 can be implemented with one or more buses.

Memory 406 and persistent storage 408 are examples of computerreadabletangible storage devices. A storage device is any piece of hardware thatis capable of storing information, such as, data, program code infunctional form, and/or other suitable information on a temporary basisand/or permanent basis. In this embodiment, memory 406 includes randomaccess memory (RAM) 414 and cache memory 416. In general, memory 406 caninclude any suitable volatile or non-volatile computerreadable storagedevice.

Replication management program 110 is stored in persistent storage 408for execution by one or more of computer processors 404 via one or morememories of memory 406. In this embodiment, persistent storage 408includes a magnetic hard disk drive. Alternatively, or in addition to amagnetic hard disk drive, persistent storage 408 can include a solidstate hard drive, a semiconductor storage device, read-only memory(ROM), erasable programmable read-only memory (EPROM), flash memory, orany other computerreadable storage medium that is capable of storingprogram instructions or digital information.

The media used by persistent storage 408 may also be removable. Forexample, a removable hard drive may be used for persistent storage 408.Other examples include optical and magnetic disks, thumb drives, andsmart cards that are inserted into a drive for transfer onto anothercomputer-readable storage medium that is also part of persistent storage408.

Communications unit 410, in these examples, provides for communicationswith other data processing systems or devices, including systems anddevices within or controlled by server computer 102. In these examples,communications unit 410 includes one or more wireless network interfacecards. Communications unit 410 may provide communications through theuse of either or both physical and wireless communications links.Computer programs and processes, such as replication management program110, may be downloaded to persistent storage 408 through communicationsunit 410, or uploaded to another system through communications unit 410.

I/O interface(s) 412 allows for input and output of data with otherdevices that may be connected to server computer 102. For example, I/Ointerface 412 may provide a connection to external devices 418 such as akeyboard, keypad, a touch screen, and/or some other suitable inputdevice. External devices 418 can also include portable computerreadablestorage media such as, for example, thumb drives, portable optical ormagnetic disks, and memory cards. Software and data used to practiceembodiments in accordance with the present invention can be stored onsuch portable computerreadable storage media and can be loaded ontopersistent storage 408 via I/O interface(s) 412. I/O interface(s) 412may also connect to a display 420.

Display 420 provides a mechanism to display data to a user and may be,for example, a touch screen or a computer monitor.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of theinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus theinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A computer program product for managingreplication configurations, the computer program product comprising: oneor more non-transitory computer readable tangible storage media andprogram instructions stored on at least one of the one or morenon-transitory storage media, the program instructions comprising:program instructions to receive a first replication configuration forreplicating data, wherein the first replication configuration defines atleast a target table in a target database based on a source table in asource database; program instructions to determine a latency value,wherein the latency value represents a latency of replicating data fromthe source database to the target database; program instructions to,responsive to determining the latency value exceeds a threshold latencyvalue and a portion of the target table in the target database isdamaged, determine to utilize a first federated view to satisfyrequesting applications; program instructions to initialize the firstfederated view, wherein the first federated view is based on at leastthe source table in the source database as defined in the firstreplication configuration; program instructions to utilize the firstfederated view to satisfy requesting applications, wherein requestingapplications obtain data from the first federated view; programinstructions to, responsive to determining the source table matches thetarget table, utilize the target table in the target database to satisfyrequesting applications; program instructions to, responsive todetermining the source table does not match the target table, initializea second federated view, wherein the second federated view is based onat least the target table in the target database in the firstreplication configuration; program instructions to utilize the secondfederated view to satisfy requesting applications, where requestingapplications obtain data from the second federated view; programinstructions to receive a second replication configuration forreplicating data, wherein the second replication configuration definesat least a new target table based on the source table; programinstructions to, responsive to determining the target table matches thenew target table, utilize the new target table in the target database tosatisfy requesting applications; program instructions to, responsive todetermining the target table does not match the new target table,initialize a third federated view, wherein the third federated view isbased on at least the new target table in the target database in thesecond replication configuration; and program instructions to utilizethe third federated view to satisfy requesting applications, whererequesting applications obtain data from the third federated view.